fix dynamic library search path for build scripts
authorJim McGrath <jimmc2@gmail.com>
Tue, 2 May 2017 15:34:29 +0000 (10:34 -0500)
committerJim McGrath <jimmc2@gmail.com>
Mon, 8 May 2017 19:24:57 +0000 (14:24 -0500)
commitb8158cfdc8dd3b197e43ec85643aa6e80a5b1af1
tree3a90cb666c2c2ac2a4195c7cbc1f19d8f52c1e49
parenta232aefff718ae22a96370a86f1c59e3cc881e64
fix dynamic library search path for build scripts

Make dynamic library search path handling for build scripts mirror the
behaviour for cargo run etc. -L paths are taken and stripped of the
native= and similar prefixes and added to the dynamic library search
path if they are inside the target dir.
Resolves https://github.com/rust-lang/cargo/issues/3957
src/cargo/ops/cargo_rustc/compilation.rs
src/cargo/ops/cargo_rustc/context.rs
src/cargo/ops/cargo_rustc/custom_build.rs
src/cargo/ops/cargo_rustc/mod.rs
tests/build-script.rs
tests/plugins.rs